The first topic of this module
is an introduction to IAM, the service that controls
access to every cloud resource. One way to look at google cloud is that it
is a collection of a piece that allow you to create and manage virtual
resources like virtual machines, cloud run services,
load balancers or more granular, a pub sub topic and a database table
on a cloud SQL database server. To interact with those APIs to
manage your infrastructure you use, the web console from a browser,
the gcloud terminal interface, terraform, a third party application that lets
you practice infrastructure as code or the client libraries
from your application. The key thing to realize here is that
google cloud is a collection of APIs that let you create virtual resources. Here are some examples of google cloud
products with example API calls to make it more concrete. For example, cloud build, submit a build,
cloud run, create a service, compute engine, start a virtual machine,
artifact registry, push a container image, cloud SQL, add
a user account to an existing instance, cloud storage, create a bucket with files. All of these examples are API calls. You can use the gcloud CLI,
the web console, client library to make the API call or any other process
that calls the API like terraform. To make it even more concrete, here is an example of what would happen
when you open a terminal window on your local machine and execute gcloud run
deploy to deploy a container image. If you enter the command, your shell
finds and invokes the declared program. Gcloud then parses the command and makes the API call to run.googleapis.com
to deploy a container image. Here's another example but
with a client library. This slide shows how you publish a message
to pubsub in a python application. Pubsub is a message
broker on google cloud. You can use it to asynchronously
send messages between services. When you publish a message
from your application, you use the pubsub client library. The client library handles
the API call for you and sends it to pubsub.googleapis.com. There are idiomatic client
libraries available for Go, Java, Node.js,
Python, Ruby, PHP, C# and C++ for most google cloud services. All of the API calls are checked by
identity and access management or IAM. IAM verifies the identity
of the collar and checks to see if it has permissions
to perform the API call. If that check fails, it rejects the call. It's important to note that IAM works the
same way regardless of if you're deploying a new revision of a cloud run
application which is an API call or if your application publishes a message
to pubsub, that's also an API call. In both examples, IAM handles
the authorization of the API calls.